import mongoose from "mongoose";

//1.定义结构
const schema = new mongoose.Schema({
    username:{
        type:String,
        unique:true,
        require:true
    },
    password:{
        type:String,
    },
    nickname:String,
    avatar:String
},{
    timestamps:true
})

//2.定义模型Model
export const UserModel = mongoose.model("user",schema);